# -*- coding: iso-8859-1 -*-
#
# Autor: Héctor Sanchez - hsanchez@pressenter.com.ar
# Autor: Alejandro Cura - alecu@vortech.com.ar
# Licencia: GPL
import pygame

# inicializar pygame
pygame.init()
SIZE = (640,480)
screen = pygame.display.set_mode(SIZE)

# cargar recursos
fondo = pygame.image.load("fondo.jpg").convert_alpha()
grossini = pygame.image.load("grossini.png").convert_alpha()
# inicializar simulacion

# repetir
running = True
while running:
    # 1-Procesar acciones
    for event in pygame.event.get():
        if event.type == pygame.QUIT:
            running = False
        elif event.type == pygame.KEYDOWN:
            if event.key == pygame.K_ESCAPE:
                running = False
    # 2-Avanzar simulacion
    # 3-Dibujar estado actual
    screen.blit( fondo, (0,0) )
    screen_center = screen.get_rect().center
    rect = grossini.get_rect(center=screen_center)
    screen.blit( grossini, rect )
    pygame.display.flip()
